﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VisitRecordEdit.aspx.cs" Inherits="SysManage.Module.Grassroots.VisitRecordEdit" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title></title>
    <script src="../../../../Resource/ueditor/ueditor.config.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
</head>
<body>
    <form runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Form1" runat="server" />
        <f:Form ID="Form1" runat="server" BodyPadding="5px">
            <Rows>
                <f:FormRow ColumnWidths="50% 50%">
                    <Items>
                        <f:DropDownList ID="ddlGroup" runat="server" Label="街道" LabelAlign="right" LabelWidth="70px" AutoPostBack="true" OnSelectedIndexChanged="ddlGroup_SelectedIndexChanged" Required="true" RequiredMessage="请选择街道" ShowRedStar="true">
                        </f:DropDownList>
                        <f:DropDownList ID="ddlItem" runat="server">
                            <f:ListItem Selected="True" Text="===请选择===" Value=""></f:ListItem>
                        </f:DropDownList>
                    </Items>
                </f:FormRow>
                <f:FormRow ColumnWidths="80% 10% 10%">
                    <Items>
                        <f:TextBox ID="txtTitle" runat="server" Label="标题" Required="true" LabelWidth="70px" LabelAlign="Right" ShowRedStar="true" RequiredMessage="请填写标题" Width="470px">
                        </f:TextBox>
                        <f:CheckBox ID="cbStatus" runat="server" Text="已发布" Width="80px"></f:CheckBox>
                        <f:CheckBox ID="cbFlags" runat="server" Text="置顶" Width="80px"></f:CheckBox>
                    </Items>
                </f:FormRow>
                <f:FormRow>
                    <Items>
                        <f:DatePicker ID="dpWorkTime" runat="server" Label="工作时间" LabelAlign="right" LabelWidth="70px" Required="true" RequiredMessage="请选择工作时间" DateFormatString="yyyy-MM-dd" ShowRedStar="true"></f:DatePicker>
                    </Items>
                </f:FormRow>
                <f:FormRow>
                    <Items>
                        <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                            <script type="text/plain" id="editor"></script>
                        </f:ContentPanel>
                    </Items>
                </f:FormRow>
            </Rows>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="Form1" Icon="SystemSaveClose"
                            runat="server" Text="保存并关闭" OnClick="btnSaveClose_Click">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Form>
    </form>
</body>
</html>
<script>
    var editorContent = '<%=EditorContent%>';

    var ue = UE.getEditor("editor", {
        initialFrameWidth: '100%',
        initialFrameHeight: '400px',
        enableAutoSave: false,
        saveInterval: 1000000,
        elementPathEnabled: false,
        autoHeightEnabled: false
    });

    ue.ready(function () {
        if (editorContent) {
            ue.setContent(editorContent);
        }
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }

</script>